import App from './App'
import uView from 'uview-ui'
import store from 'store/index.js'
import Common from "common/h5_authorization.js"
import vueLazyLoad from "vue-lazyload"
import initModal from "@/common/initModal.js"
import showModal from "@/components/show-modal/show-modal.vue"
import {Cmessage} from '@/components/yy_model/index.js'
import bgmusic from '@/common/bgmusic.js'

//js调用弹框
initModal(Vue)
Vue.component('show-modal',showModal)

// #ifndef VUE3
import Vue from 'vue'
Vue.prototype.$store = store
Vue.config.productionTip = false
Vue.use(uView)
Vue.use(vueLazyLoad)

// #ifdef MP
// 引入uView对小程序分享的mixin封装
let mpShare = require('uview-ui/libs/mixin/mpShare.js');
Vue.mixin(mpShare)
// #endif
Vue.config.ignoredElements.push('wx-open-launch-weapp') 
Vue.prototype.$Cmessage = Cmessage
Vue.prototype.$getUrlParam = Common.getUrlParam;
Vue.prototype.$userLoginCheck=Common.userLoginCheck
Vue.prototype.$getRouteCode=Common.getRouteCode
Vue.prototype.$wxShare=Common.wxShare
Vue.prototype.$signSound=bgmusic.signSound
Vue.prototype.$http_cos='https://hl-1316403513.cos.ap-shanghai.myqcloud.com'
uni.$u.setConfig({
	// 修改$u.config对象的属性
	config: {
		baseURL:'https://h5.caiayi.cn',
		// 修改默认单位为rpx，相当于执行 uni.$u.config.unit = 'rpx'
		unit: 'rpx'
	},
	// 修改$u.props对象的属性
	props: {
		// 修改radio组件的size参数的默认值，相当于执行 uni.$u.props.radio.size = 30
		radio: {
			size: 15
		}
		// 其他组件属性配置
		// ......
	}
})
App.mpType = 'app'
const app = new Vue({
    ...App,
	store
})
require('./common/request.js')(app)
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif